package com.cai.oamanager.service.impl;

import com.cai.oamanager.dao.FileDao;
import com.cai.oamanager.entity.SendFile;
import com.cai.oamanager.service.SendFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/1/22 10 : 43
 * @package：com.cai.oamanager.service.impl
 */
@Service
public class SendFileServiceImpl implements SendFileService {
    @Autowired
    private FileDao fileDao;
    @Override
    public List<SendFile> getAllSendFiles(String spid, String liketext, Integer start, Integer size) {
        return fileDao.getAllSendFiles(spid,liketext,start,size);
    }

    @Override
    public SendFile getSendFile(Integer fsid) {
        return null;
    }

    @Override
    public int getSendFileCount(String spid) {
        return fileDao.getSendFileCount(spid);
    }

    @Override
    public void addSendFile(SendFile sendFile) {
        fileDao.addSendFile(sendFile);
    }

    @Override
    public void deleteFile(Integer fsid) {
        fileDao.deleteFile(fsid);
    }

    @Override
    public void updateFile(SendFile sendFile) {

    }

    @Override
    public List<SendFile> getAllReciveFiles(String spid, Integer positionId, String liketext, Integer start, Integer size) {
        return fileDao.getAllReciveFiles(spid,positionId,liketext,start,size);
    }

    @Override
    public int getReciveFileCount(String spid, Integer positionId) {
        return fileDao.getReciveFileCount(spid,positionId);
    }

    @Override
    public void updateState(Integer fsid) {
        fileDao.updateState(fsid);
    }

    @Override
    public void updateCount(Integer count, Integer fsid) {
        fileDao.updateCount(count,fsid);
    }

    @Override
    public int getCount(Integer fsid) {
        return fileDao.getCount(fsid);
    }
}
